<template>
  <div class="son">
     <h4>左侧</h4>
     <p>{{ leftMsg }}</p>
     <button @click="toRight">传递给右侧的兄弟</button>
  </div>
</template>

<script>
// // 导入bus对象
// import bus from '../eventBus/index.js'

export default {
  data() {
    return {
       leftMsg: '我是左边的数据'
    }
  },

  methods: {
    toRight () {
     
      // 发送了通知
      // bus.$emit('leftSend', this.leftMsg)
      this.$bus.$emit('leftSend', this.leftMsg)
    }
  }
}
</script>

<style>
.son {
  width: 300px;
  height: 300px;
  border: 1px solid #000;
}
</style>